|
The skew binary number system is a non-standard positional numeral system in which the nth digit has a value of and each digit has a value of 0, 1, or 2. Each number can be written uniquely in skew binary canonical form where there is only at most one instance of the digit 2, which must be the first non-zero least significant digit, as shown in following table: The advantage of skew binary is that each increment operation can be done with at most one carry operation. This exploits the fact that . Incrementing a skew binary number is done by setting the only two to a zero and incrementing the next digit from zero to one or one to two.〔(skew binary numbers )〕 Skew binary numbers find applications in skew binomial heaps, a variant of binomial heaps that support worst-case O(1) insertion, and in skew binary random access lists, a purely functional data structure. They also find use in bootstrapped skew binomial heaps, which have excellent asymptotic guarantees.〔Okasaki, Chris. ''Purely Functional Data Structures.''〕 ==See also== * Three-valued logic * Redundant binary representation * n-ary Gray code 抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)』 ■ウィキペディアで「skew binary number system」の詳細全文を読む スポンサード リンク
|